import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.0
// import Qt.labs.platform
Window {
    id: root
    visible: true
    width: 640
    height: 480
    title: qsTr("属性编辑")
    color: "#f5f5f5"
    property int time_msec: 0

    Item{
        anchors.fill: parent
        QtObject{
            id: data
            property color border: "red"
            property int borderWidth: 1
            property string name: "tangjc"
            property int age: 18
            property bool isBoy: true
            property var styles: ["dark","light"]
            property string style: "dark"
        }

        Rectangle{
            id: rect
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.left: parent.left
            anchors.right: propertysWindow.left
            border.color: data.border
            border.width: data.borderWidth
            Text{
                anchors.centerIn: parent
                text: "name:" + data.name + " age:" + data.age + " gender:" + (data.isBoy ? "男" : "女")
            }
        }

        PropertysList{
            id: propertysWindow

            height: parent.height - Theme.doubleMargin
            anchors.right: parent.right
            anchors.rightMargin: Theme.margin
            anchors.verticalCenter: parent.verticalCenter
            target: data
        }
    }
}
